<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta HTTP-EQUIV="pragma" CONTENT="no-cache">
    <meta HTTP-EQUIV="Cache-Control" CONTENT="no-store, must-revalidate">
    <meta HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta HTTP-EQUIV="expires" CONTENT="0">
    <meta content="yes" name="apple-mobile-web-app-capable"/>
    <meta content="black" name="apple-mobile-web-app-status-bar-style"/>
    <meta content="telephone=no" name="format-detection"/>
    <title>校淘</title>
    <link rel="stylesheet" type="text/css" href="../css/lib/weui.min.css">
    <link rel="stylesheet" type="text/css" href="../css/global.css">
    <link rel="stylesheet" type="text/css" href="../css/lib/swiper-4.1.6.min.css">
    <link rel="stylesheet" type="text/css" href="../css/lib/weui2.css">
    <link rel="stylesheet" type="text/css" href="../css/lib/icon.css">
    <script src="../js/lib/preventLocation.js"></script>
</head>

<body>
<div class="header-nav">
    <a href="javascript:history.go(-1);">返回</a>
</div>
<div class="m-container color-f8f8f8 margin-top-container">
    <div class="swiper-container swiper-container-horizontal swiper-good-detail">
        <div class="swiper-wrapper">
        </div>
        <div class="swiper-pagination"></div>
    </div>
    <!-- end swiper-->
    <div class="good-detail-info">
        <p class="good-title">
            -
        </p>
        <p class="good-detail-price"><span class="detail-price"></span><span class="good-detail-postage ">邮费：66</span>
        </p>

    </div>
    <div class="goods-detail-describe">
        -
    </div>
</div>

<!-- end container -->
<div class="m-footer">

</div>
<!-- end footer-buy -->

<script src="../js/lib/zepto.min.js"></script>
<script src="../js/lib/weui.min.js"></script>
<script src="../js/lib/swiper-4.1.6.min.js"></script>
<script src="../js/Common.js"></script>
<script src="../js/Model.js?v=2"></script>
<script src="../js/views/product_release_detail.js"></script>
<script>
    function upDownOperation(element) {
        var _input = element.parent().find('input'),
            _value = _input.val(),
            _step = _input.attr('data-step') || 1;
        //检测当前操作的元素是否有disabled，有则去除
        element.hasClass('disabled') && element.removeClass('disabled');
        //检测当前操作的元素是否是操作的添加按钮（.input-num-up）‘是’ 则为加操作，‘否’ 则为减操作
        if (element.hasClass('weui-number-plus')) {
            var _new_value = parseInt(parseFloat(_value) + parseFloat(_step)),
                _max = _input.attr('data-max') || false,
                _down = element.parent().find('.weui-number-sub');

            //若执行‘加’操作且‘减’按钮存在class='disabled'的话，则移除‘减’操作按钮的class 'disabled'
            _down.hasClass('disabled') && _down.removeClass('disabled');
            if (_max && _new_value >= _max) {
                _new_value = _max;
                element.addClass('disabled');
            }
        } else {
            var _new_value = parseInt(parseFloat(_value) - parseFloat(_step)),
                _min = _input.attr('data-min') || false,
                _up = element.parent().find('.weui-number-plus');
            //若执行‘减’操作且‘加’按钮存在class='disabled'的话，则移除‘加’操作按钮的class 'disabled'
            _up.hasClass('disabled') && _up.removeClass('disabled');
            if (_min && _new_value <= _min) {
                _new_value = _min;
                element.addClass('disabled');
            }
        }
        _input.val(_new_value);
    }


    $(function () {
        $('.weui-number-plus').click(function () {
            upDownOperation($(this));
        });
        $('.weui-number-sub').click(function () {
            upDownOperation($(this));
        });
    });
</script>
</body>

</html>